<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ include file="header_admin.jsp"%>

<!-- 以上为页头 设置head 引用样式相关信息 请勿修改  请直接修改header.jsp文件  by 小灯笼 -->

<!-- 以下为正文 -->
<div class="container">
	<div class="widget-body">
		<div class="row-fluid">
			<div class="span2"></div>

			<div class="span10">

				<div class="span5"></div>
				<div class="span4">
					<span class="label label-success"><h2>${roomid }</h2></span>
				</div>
				<div class="span2"></div>
				<div class="widget">

					<div class="widget-header"></div>

					<div class="widget-body">
						<form id="saveroom" action="" method="post">
							<input type="hidden" id="roomid" name="roomid" value="${roomid }">
							<table
								class="table table-condensed table-striped table-bordered table-hover no-margin">
								<thead>
									<tr>
										<th style="text-align:center">预定日期</th>
										<th style="text-align:center">预定时间</th>
										<th style="text-align:center">预定理由</th>
										<th style="text-align:center">具体信息</th>
										<th style="text-align:center">是否同意</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${bookinfo }" var="bookinfo">
										<tr>
											<td style="text-align:center">${fn:substring(bookinfo.orderDate, 0, 10) }</td>
											<td style="text-align:center">
											<c:choose>
												<c:when test="${bookinfo.orderTime  == 1}">
													08:00 - 10:00
												</c:when>
												<c:when test="${bookinfo.orderTime  == 2}">
													10:30 - 12:00
												</c:when>
												<c:when test="${bookinfo.orderTime  == 3}">
													14:00 - 17:00
												</c:when>
												<c:when test="${bookinfo.orderTime  == 4}">
													19:00 - 22:00
												</c:when>
											</c:choose>
											
											</td>
											<td style="text-align:center">${bookinfo.reason }</td>
											<td style="text-align:center"><button type="button" class="btn btn-info" onclick="window.location.href='/mycms/admin/room_orderinfo?id=${bookinfo.id }'">操作</button></td>
											<td style="text-align:center">
											    <c:if test="${bookinfo.approved == 0 }">
												<button class="btn btn-danger" disabled>不同意</button>
												</c:if>
												<c:if test="${bookinfo.approved == 1 }">
												<button class="btn btn-primary" disabled>同意</button>
												</c:if>
											</td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 以上为正文 -->

<!-- 以下为页脚 及JS相关 请勿修改 请直接修改footer.jsp文件   by 小灯笼 -->
<jsp:include page="footer.jsp" />